<h3 class="adminTitle">论坛列表</h3>
<div class="adminContent">
    <table class = "sheet">
        <tr>
            <th>版块</th>
            <th>说明</th>
            <th>管理</th>
        </tr>
        <?php
            foreach ($this->categories as $category){
                echo "<tr style='background: #EEE;'>";
                    echo "<td colspan = '2'>".$category['catname']."</td>";
                    echo "<td><a href = '/admin/community/update-category/id/".$category['id']."'>编辑</a>
                         | <a href = '/admin/community/delete-category/id/".$category['id']."'>删除</a>
                         | <a href = '/admin/community/move-category/id/".$category['id']."/direction/up'>上移</a>
                         | <a href = '/admin/community/move-category/id/".$category['id']."/direction/down'>下移</a></td>";
                echo "</tr>";
                foreach ($category['forums'] as $forum){
                    echo "<tr>";
                    echo "<td>".$forum['name']."</td>";
                    echo "<td>".$forum['description']."</td>";
                    echo "<td><a href = '/admin/community/update-forum/id/".$forum['id']."'>编辑</a>
                         | <a href = '/admin/community/delete-forum/id/".$forum['id']."'>删除</a></td>";
                    echo "</tr>";
                    
                }
            }
        ?>
    </table>
    <span><a href = "/admin/community/create-category">添加分区</a></span>
    <span><a href = "/admin/community/create-forum">添加版块</a></span>
</div>